package com.wyhello.tube4.spring.model;

import java.util.List;

import com.wyhello.tube4.facade.TubeFacade;
import com.wyhello.tube4.pojo.Exchange;
import com.wyhello.tube4.pojo.Position;
import com.wyhello.tube4.pojo.Reside;
import com.wyhello.tube4.pojo.Tube;

public class ExchangeRecordsModel {

	private TubeFacade facade;

	public TubeFacade getFacade() {
		return facade;
	}

	public void setFacade(TubeFacade facade) {
		this.facade = facade;
	}
	
	/**
	 * 换管记录信息的录入
	 * @param change 要录入的信息
	 * @return 返回是否录入成功
	 */
	public boolean saveChange(Exchange change){
		return facade.saveChange(change);
	}
	/**
	 * 对换管记录的信息进行批量删除
	 * @param ids 要删除的id
	 * @return 返回删除的条数
	 */
	public int deleteChange(String ids){
		return facade.deleteChange(ids);
	}
	/**
	 * 查询所有的换管记录信息
	 * @return 返回所有换管记录的信息
	 */
	public List<Exchange> queryChange(){
		return facade.queryChange();
	}
	/**
	 * 根据id查询换管记录信息
	 * @param id 要查询的id
	 * @return 为ID的换管记录信息
	 */
	public Exchange getChangeById(int id){
		return facade.getChangeById(id);
	}
	/**
	 * 对换管记录进行修改
	 * @param change 修改后的信息
	 * @return 修改是否成功
	 */
	public boolean updateChange(Exchange change){
		return facade.updateChange(change);
	}
	
	/**
	 * 根据受热面id查询有换管记录的管信息
	 * @param 受热面id
	 * @return
	 */
	public List<Reside> queryExchangeRowBySurfaceId(int id){
		return facade.queryExchangeRowBySurfaceId(id);
	}
	
	
	public List<Tube> queryExchangeTubeByRowId(int id){
		return facade.queryExchangeTubeByRowId(id);
	}

	public List<Position> queryExchangePositionByTubeId(int id) {
		return facade.queryExchangePositionByTubeId(id);
	}

	public List<Exchange> queryExchangeByPositionId(int id) {
		return facade.queryExchangeByPositionId(id);
	}

	public int deleteExchangeById(int id) {
		return facade.deleteExchangeById(id);
	}
}
